import request from '@/axios'
import type { ListParams, Response } from '@/api/api'

export interface Row {
  id?: number
  real_name: string
  mobile: string
  money: string
  store_ids: string
}

// 业务员列表
export const getListApi = (data: ListParams): Promise<Response<Row>> => {
  return request.post({ url: '/store/sales/list', data })
}
// 业务员列表新增
export const createApi = (data: Partial<Row>): Promise<IResponse> => {
  return request.post({ url: 'store/sales/create', data })
}
// 业务员修改
export const modifyApi = (data: Partial<Row>): Promise<IResponse> => {
  return request.post({ url: 'store/sales/modify', data })
}
// 业务员列表删除
export const delApi = (data: { id: string }): Promise<IResponse> => {
  return request.post({ url: 'store/sales/del', data })
}
